package com.xt.stock.project.service.user;

import com.xt.stock.project.common.constant.XtCodeConstant;
import com.xt.stock.project.common.exception.XtServiceException;
import org.springframework.stereotype.Service;

@Service
public class LoginService {

    /**
     * 用户登录
     * @param userName
     * @param password
     */
    public void login(String userName,String password) {
        //校验用户名密码

        //用户名密码校验不成功抛出异常
        if(true) {
            throw new XtServiceException(XtCodeConstant.ERROR_AUTHENTICATE_FAIL,"用户名密码错误");
        }
        //用户名密码正确之后生成存储token

    }

    /**
     * 注销登录
     */
    public void signOut() {
        //清除token
    }

}
